package com.estock.platform.reader;

import java.util.List;
import java.util.Map;

public abstract class AbstractDataReader<T> {
	
	protected static Map<String, Integer> yahooCsvMapping; 
	
    protected Integer columnIndex(String key){
    	if (yahooCsvMapping == null) {
    		yahooCsvMapping = createCsvMapping();
    	}
        return yahooCsvMapping.get(key);
    }
    
    public abstract List<T> read(String fileName);
    
    protected abstract Map<String, Integer> createCsvMapping();
    
    
}
